<template>
  <div class="banner">
    <!-- <el-carousel height="404px">
      <el-carousel-item v-for="(item,index) in data" :key="index">
        <img :src="item.url" alt="">
      </el-carousel-item>
    </el-carousel> -->
     <el-carousel  class="lunbotu">
        <el-carousel-item v-for="(item,index) in data" :key="index">
            <img :src="item.url" alt="">
        </el-carousel-item>
    </el-carousel>
    <!-- 定位栏 -->
    <div class="contentHeaderCon">
        <h1 class="conHeaderTitle1">{{companyText1}}</h1>
        <h1 class="conHeaderTitle2">{{companyText2}}</h1>
    </div>
  </div>
</template>

<script>
import {getWebsiteOtherTuData} from '@/api/getData'
export default {
  data(){
    return{
      data:[],
      companyText1:'',
      companyText2:'',
    }
  },
  created(){
    this.getWebsiteOtherTuDataList()
  },
  methods:{
    // banner图
    async getWebsiteOtherTuDataList(){
      try {
        const res = await getWebsiteOtherTuData({}).then(res=>{
          // console.log('bannerTu',res);
          this.data=res.data.bannerUrl
          this.companyText1=res.data.list[0].theme
                    this.companyText2=res.data.list[0].subtitle
        })
      } catch (error) {
        
      }
    }
  }
}
</script>

<style lang="scss" scoped>
.lunbotu{
    height: 600px;
}
.el-carousel__item h3 {
    color: #475669;
    font-size: 14px;
    opacity: 0.75;
    // line-height: 404px;
    margin: 0;
  }

  .el-carousel__item:nth-child(2n) {
     background-color: #99a9bf;
  }
  
  .el-carousel__item:nth-child(2n+1) {
     background-color: #d3dce6;
  }
</style>